$(function () {
    $.get("/api/v1/menus/" + $.getUrlParam("mi") + "/operator", function (data) {

        if (!data.editable) {
            $("#edit").hide();
        }

        if (!data.addable) {
            $("#add").hide();
        }

        if (!data.deletable) {
            $("#delete").hide();
        }

        $("#loading").fadeOut();
    });

    $('#userDg').iDatagrid({
        url: '/api/v1/users',
        method: 'GET',
        columns: [[
            {field: 'uuid', title: 'UUID', checkbox: true},
            {field: 'id', title: 'ID', width: 100, hidden: true},
            {field: 'userName', title: '用户名', width: 100},
            {field: 'telephone', title: '手机号', width: 100},
            {field: 'email', title: '邮箱', width: 100},
            {field: 'belongType', title: '所属类型', width: 100},
            {field: 'belongId', title: '所属id', width: 100},
            {field: 'status', title: '用户状态', width: 100},
            {field: 'createdBy', title: '创建人', width: 100},
            {field: 'createDate', title: '创建时间', width: 150}
        ]]
    });



});


